import request from '@/utils/request'

export function getRodWarnListAPI(params) {
    return request({
        url: '/pole/warning/list',
        method: 'GET',
        params: params
    })
}

export function delRodWarnAPI(id) {
    return request({
        url: '/pole/warning/' + id,
        method: 'DELETE'
    })
}

export async function getRodWarnAPI(id) {
    try {
        const response = await request.get(`/pole/warning/${id}`);
        return response;
    } catch (error) {
        console.error('Failed to fetch rod warning:', error);
        throw error;
    }
  }